package com.shycloud.mido.organ.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shycloud.mido.organ.api.dto.StudentOrderDTO;
import com.shycloud.mido.organ.api.dto.TeacherDetailedDTO;
import com.shycloud.mido.organ.api.entity.*;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StudentOrderMapper extends BaseMapper<StudentOrderEntity> {

	/**
	 * @author: Cxc
	 * @Date: 2019/9/24 20:21
	 * @Description: 购买课节详情
	 */
	IPage selectStudentOrderInfo(@Param("page") Page page, @Param("entity") StudentOrderDTO entity);

	/**
	 * 获取可排课订单列表
	 *
	 * @param entity StudentOrderEntity
	 * @return list
	 */
	List<StudentOrderDTO> selectSurplusOrderList(@Param("query") StudentOrderEntity entity);

	/**
	 * @author: Cxc
	 * @Date: 2019/9/24 20:21
	 * @Description: 学生缴费列表
	 */
	IPage selectStudentOrderList(@Param("page") Page page, @Param("entity") StudentOrderDTO entity);

	/**
	 * @author: Cxc
	 * @Date: 2019/10/11 17:58
	 * @Description: app教师端学生管理-订单列表
	 */
	List<StudentOrderEntity> selectTeacherStudentList(@Param("entity") TeacherDetailedDTO teacherDetailedDTO);

	/**
	 * @author: Cxc
	 * @Date: 2019/10/11 17:58
	 * @Description: app教师端学生管理-订单列表(全学生)
	 */
	List<StudentOrderEntity> selectTeacherStudentOrgList(@Param("its") List<TeacherDetailedEntity> teacherDetailedEntities, @Param("name") String name);

	/**
	 * @author: Cxc
	 * @Date: 2019/10/18 16:24
	 * @Description: app通过学生的memberId 查询 学生不分机构的订单
	 */
	List<StudentOrderEntity> selectStudentOrderByMemberId(@Param("its") List<StudentDetailedEntity> studentDetailedEntities, @Param("name") String name);

	/**
	 * @author: Cxc
	 * @Date: 2019/10/23 16:11
	 * @Description:  查询老师下学生 筛选科目和类型app
	 */
	List<StudentOrderDTO> selectStudentOrderByTeacher(@Param("its") List<TeacherStudentEntity> list,@Param("entity")StudentOrderDTO studentOrderDTO);

	/**
	 * @author: Cxc
	 * @Date: 2019/10/30 11:18
	 * @Description: 修改退款订单数量
	 */
	boolean updateOrderId(StudentRefundEntity studentRefundEntity);
}
